import Vue from 'vue'
import SvgIcon from '@/components/SvgIcon'// svg component

// register globally
Vue.component('svg-icon', SvgIcon)

// require 单独引入
// require('./svg/eye.svg')
// 批量导入文件
// webpack提供功能
// https://webpack.docschina.org/guides/dependency-management/#requirecontext
const req = require.context('./svg', false, /\.svg$/)
const requireAll = requireContext => requireContext.keys().map(requireContext)
requireAll(req)
